<?php
/**
 * Status View for Congregation Component
 * 
 * @package    Congregation
 * @subpackage Components
 * @link http://docs.joomla.org/Developing_a_Model-View-Controller_Component_-_Part_4
 * @license		GNU/GPL
 */

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.view' );

/**
 * Status View
 *
 * @package    Congregation
 * @subpackage Components
 */
class CongregationViewStatus extends CongregationView
{
	
	
	function display($tpl = null)
	{
	
		// Get data from the model
		$status =& $this->get('Data');
		$statuses =& $this->get('List');
		
		$isNew		= ($status->id < 1);
		$this->assignRef('status', $status);
		$this->assignRef('statuses', $statuses);
		
		if($isNew)
		{
			JToolBarHelper::title(   JText::_( 'New Status' ), 'generic.png' );
		}
		else
		{
			JToolBarHelper::title(   JText::_( 'Edit Status' ), 'generic.png' );
		}
		JToolBarHelper::save();
		JToolBarHelper::back(JText::_('Back'), JRoute::_( 'index.php?option=com_congregation&controller=status'));
		
		
		

		parent::display($tpl);
	}
	
}
